bitkeeper revision 1.1108.1.14 (4100e933KE68B3Jf7yha3GgIVt-Msw)
authormjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Fri, 23 Jul 2004 10:32:19 +0000 (10:32 +0000)
committermjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Fri, 23 Jul 2004 10:32:19 +0000 (10:32 +0000)
Stub changes.

tools/libxc/xc_io.c
tools/xfrd/xen_domain.c

index b7ce6342abd8ee2db048c3ef9bd2523e4e01292c..4615092e97b94ac452c8b2cd8179e4c2ae764c71 100644 (file)
@@ -4,7 +4,7 @@ void xcio_error(XcIOContext *ctxt, const char *msg, ...){
   va_list args;
 
   va_start(args, msg);
-  vfprintf(stdout, msg, args); fprintf(stdout, "\n");
+  vfprintf(stdout, msg, args); fprintf(stdout, "\n"); fflush(stdout);
   IOStream_vprint(ctxt->info, msg, args);
   IOStream_print(ctxt->info, "\n");
   va_end(args);
index adef919af18faa87507ce7716e37d1f75b6c37dd..a3e270518ed658e4dc593ac67051fa492ac77b3d 100644 (file)
@@ -2,7 +2,9 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#ifndef _XEN_XFR_STUB_
+#ifdef _XEN_XFR_STUB_
+typedef unsigned long u32;
+#else
 #include "xc.h"
 #include "xc_io.h"
 #endif
@@ -16,8 +18,8 @@
 #define DEBUG 1
 #include "debug.h"
 
-#ifndef _XEN_XFR_STUB_
-static int domain_suspend(u32 dom, void *data){
+
+int domain_suspend(u32 dom, void *data){
     int err = 0;
     Conn *xend = data;
 
@@ -27,6 +29,7 @@ static int domain_suspend(u32 dom, void *data){
     return err;
 }
 
+#ifndef _XEN_XFR_STUB_
 static int xc_handle = 0;
 
 int xcinit(void){
@@ -61,6 +64,7 @@ int xen_domain_snd(Conn *xend, IOStream *io, uint32_t dom, char *vmconfig, int v
     err = marshal_string(io, vmconfig, vmconfig_n);
     if(err) goto exit;
     n = 32 * 1024 * 1024;
+    n = 32 * 1024;
     buf_n = sizeof(buf);
     err = marshal_uint32(io, n);
     for(k = 0; k < n; k += d){
@@ -72,7 +76,8 @@ int xen_domain_snd(Conn *xend, IOStream *io, uint32_t dom, char *vmconfig, int v
     }
     
     dom = 99;
-    err = xfr_vm_suspend(xend, dom);
+    err = domain_suspend(dom, xend);
+    IOStream_close(io);
   exit:
 #else 
     XcIOContext _ioctxt = {}, *ioctxt = &_ioctxt;
@@ -195,7 +200,7 @@ int xen_domain_configure(uint32_t dom, char *vmconfig, int vmconfig_n){
     // POST the form.
     curl_easy_setopt(curl, CURLOPT_HTTPPOST, form);
     dprintf("> curl perform...\n");
-#ifdef _XEN_XFR_STUB_
+#if 0 && defined(_XEN_XFR_STUB_)
     dprintf("> _XEN_XFR_STUB_ defined - not calling xend\n");
     curlcode = 0;
 #else